
from tkinter import *
import os
import pickle
import random
naves=0
conta=0
## se carga la imagen de fondo
def cargarImagen(nombre):
    ruta = os.path.join('Imagenes',nombre)
    imagen = PhotoImage(file=ruta)
    return imagen
##Crear ventana
ventana = Tk()
ventana.title("Space Battle")
ventana.minsize(900,650)
ventana.resizable(width=NO,height=NO)

##Fondo de la pantalla
imagen1 = cargarImagen("Inicio.gif")
LabelFondo=Label(ventana, image=imagen1)
LabelFondo.place (x=-100, y=-100)

#se crea la ventana principal
def juego_nuevo():
    ventana.withdraw()
    juego_nuevo = Toplevel()    
    juego_nuevo.title("Space Battle")
    juego_nuevo.minsize(900,650)
    juego_nuevo.resizable(width=NO,height=NO)

    imagen2 = cargarImagen("Inicio.gif")
    LabelFondo=Label(juego_nuevo, image=imagen2)
    LabelFondo.place (x=-100, y=-100)

    etiquetatexto = Label(juego_nuevo, text = "Escriba su nombre", font = ("Arial","22",), bg = "blue", fg = "#ffffff", width= 15, height = 0)
    etiquetatexto.place(x = 10, y = 150)


    #entrada = Entry(widgetContenedor, width)  
    entrada = Entry(juego_nuevo, width=50)
    entrada.place(x=10,y=210)



def naves():
        ventana.withdraw()
    ##Creamos otra ventana
        naves = Toplevel()
        naves.title("Space Battle")
        naves.minsize(900,650)
        naves.resizable(width=NO,height=NO)

        imagen2 = cargarImagen("Inicio.gif")
        LabelFondo=Label(naves, image=imagen2)
        LabelFondo.place (x=-100, y=-100)
        # funcion para la cual se aplica el contador de la matriz del jugador
        def comparar ():
            if int(entrada2.get()) > 0 and int(entrada2.get()) <=99:
                return comparar_aux(int(entrada2.get()))
            else:
                return "Error"
        def comparar_aux(entrada2):
            global conta
            print(entrada2)
            print (conta)
            if conta==entrada2:
                return comparar1()

        def comparar1():
            global conta
            print (int(entrada2.get()))
            print (conta)                                                                                                                                                                                                                                                                                                                                                                                                                                   
            if conta == int(entrada2.get()):
                return juego_nuevo()

        def juego_nuevo():
            if conta == int(entrada2.get()):
                return juego_nuevo1()

        def juego_nuevo1():
            print("Listo")
            messagebox.showinfo("Listo","Listo ya puede empezar a jugar")
            print ("Mensaje leido:","Listo ya puede empezar a jugar")
            return jugar()
                   
        #se empieza el juego
        def empezar_juego(intentos,aciertos):
            print ("entrada:",int(entrada2.get()))
            print ("intentos:",intentos)
            print ("aciertos:",aciertos)
            if aciertos==int(entrada2.get()):
                return terminojuego()
        #las siguientes 200 funciones son para saber si hay un barco o no
        def barco_hundido_boton1c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton1c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton1c.place(x=540,y=150)
            return tiro1()
        def no_hay_barco_boton1c():
            print("Por qué")
            global intentos
            intentos+=1
            boton1c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton1c.place(x=540,y=150)
            return tiro2()
        
        def barco_hundido_boton2c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton2c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton2c.place(x=570,y=150)
            return tiro1()
        def no_hay_barco_boton2c():
            print("Por qué")
            global intentos
            intentos+=1
            boton2c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton2c.place(x=570,y=150)
            return tiro2()

        def barco_hundido_boton3c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton3c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton3c.place(x=600,y=150)
            return tiro1()
        def no_hay_barco_boton3c():
            print("Por qué")
            global intentos
            intentos+=1
            boton3c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton3c.place(x=600,y=150)
            return tiro2()

        def barco_hundido_boton4c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton4c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton4c.place(x=630,y=150)
            return tiro1()
        def no_hay_barco_boton4c():
            print("Por qué")
            global intentos
            intentos+=1
            boton4c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton4c.place(x=630,y=150)
            return tiro2()

        def barco_hundido_boton5c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton5c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton5c.place(x=660,y=150)
            return tiro1()
        def no_hay_barco_boton5c():
            print("Por qué")
            global intentos
            intentos+=1
            boton5c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton5c.place(x=660,y=150)
            return tiro2()

        def barco_hundido_boton6c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton6c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton6c.place(x=690,y=150)
            return tiro1()
        def no_hay_barco_boton6c():
            print("Por qué")
            global intentos
            intentos+=1
            boton6c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton6c.place(x=690,y=150)
            return tiro2()

        def barco_hundido_boton7c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton7c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton7c.place(x=720,y=150)
            return tiro1()
        def no_hay_barco_boton7c():
            print("Por qué")
            global intentos
            intentos+=1
            boton7c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton7c.place(x=720,y=150)
            return tiro2()

        def barco_hundido_boton8c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton8c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton8c.place(x=750,y=150)
            return tiro1()
        def no_hay_barco_boton8c():
            print("Por qué")
            global intentos
            intentos+=1
            boton8c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton8c.place(x=750,y=150)
            return tiro2()

        def barco_hundido_boton9c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton9c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton9c.place(x=780,y=150)
            return tiro1()
        def no_hay_barco_boton9c():
            print("Por qué")
            global intentos
            intentos+=1
            boton9c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton9c.place(x=780,y=150)
            return tiro2()

        def barco_hundido_boton10c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton10c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton10c.place(x=810,y=150)
            return tiro1()
        def no_hay_barco_boton10c():
            print("Por qué")
            global intentos
            intentos+=1
            boton10c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton10c.place(x=810,y=150)
            return tiro2()

        def barco_hundido_boton11c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton11c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton11c.place(x=540,y=175)
            return tiro1()
        def no_hay_barco_boton11c():
            print("Por qué")
            global intentos
            intentos+=1
            boton11c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton11c.place(x=540,y=175)
            return tiro2()
        
        def barco_hundido_boton12c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton12c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton12c.place(x=570,y=175)
            return tiro1()
        def no_hay_barco_boton12c():
            print("Por qué")
            global intentos
            intentos+=1
            boton12c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton12c.place(x=570,y=175)
            return tiro2()

        def barco_hundido_boton13c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton13c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton13c.place(x=600,y=175)
            return tiro1()
        def no_hay_barco_boton13c():
            print("Por qué")
            global intentos
            intentos+=1
            boton13c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton13c.place(x=600,y=175)
            return tiro2()

        def barco_hundido_boton14c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton14c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton14c.place(x=630,y=175)
            return tiro1()
        def no_hay_barco_boton14c():
            print("Por qué")
            global intentos
            intentos+=1
            boton14c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton14c.place(x=630,y=175)
            return tiro2()

        def barco_hundido_boton15c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton15c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton15c.place(x=660,y=175)
            return tiro1()
        def no_hay_barco_boton15c():
            print("Por qué")
            global intentos
            intentos+=1
            boton15c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton15c.place(x=660,y=175)
            return tiro2()

        def barco_hundido_boton16c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton16c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton16c.place(x=690,y=175)
            return tiro1()
        def no_hay_barco_boton16c():
            print("Por qué")
            global intentos
            intentos+=1
            boton16c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton16c.place(x=690,y=175)
            return tiro2()

        def barco_hundido_boton17c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton17c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton17c.place(x=720,y=175)
            return tiro1()
        def no_hay_barco_boton17c():
            print("Por qué")
            global intentos
            intentos+=1
            boton17c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton17c.place(x=720,y=175)
            return tiro2()

        def barco_hundido_boton18c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton18c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton18c.place(x=750,y=175)
            return tiro1()
        def no_hay_barco_boton18c():
            print("Por qué")
            global intentos
            intentos+=1
            boton18c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton18c.place(x=750,y=175)
            return tiro2()

        def barco_hundido_boton19c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton19c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton19c.place(x=780,y=175)
            return tiro1()
        def no_hay_barco_boton19c():
            print("Por qué")
            global intentos
            intentos+=1
            boton19c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton19c.place(x=780,y=175)
            return tiro2()

        def barco_hundido_boton20c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton20c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton20c.place(x=810,y=175)
            return tiro1()
        def no_hay_barco_boton20c():
            print("Por qué")
            global intentos
            intentos+=1
            boton20c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton20c.place(x=810,y=175)
            return tiro2()

        def barco_hundido_boton21c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton21c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton21c.place(x=540,y=200)
            return tiro1()
        def no_hay_barco_boton21c():
            print("Por qué")
            global intentos
            intentos+=1
            boton21c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton21c.place(x=540,y=200)
            return tiro2()
        
        def barco_hundido_boton22c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton22c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton22c.place(x=570,y=200)
            return tiro1()
        def no_hay_barco_boton22c():
            print("Por qué")
            global intentos
            intentos+=1
            boton22c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton22c.place(x=570,y=200)
            return tiro2()

        def barco_hundido_boton23c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton23c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton23c.place(x=600,y=200)
            return tiro1()
        def no_hay_barco_boton23c():
            print("Por qué")
            global intentos
            intentos+=1
            boton23c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton23c.place(x=600,y=200)
            return tiro2()

        def barco_hundido_boton24c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton24c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton24c.place(x=630,y=200)
            return tiro1()
        def no_hay_barco_boton24c():
            print("Por qué")
            global intentos
            intentos+=1
            boton24c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton24c.place(x=630,y=200)
            return tiro2()

        def barco_hundido_boton25c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton25c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton25c.place(x=660,y=200)
            return tiro1()
        def no_hay_barco_boton25c():
            print("Por qué")
            global intentos
            intentos+=1
            boton25c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton25c.place(x=660,y=200)
            return tiro2()

        def barco_hundido_boton26c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton26c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton26c.place(x=690,y=200)
            return tiro1()
        def no_hay_barco_boton26c():
            print("Por qué")
            global intentos
            intentos+=1
            boton26c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton26c.place(x=690,y=200)
            return tiro2()

        def barco_hundido_boton27c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton27c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton27c.place(x=720,y=200)
            return tiro1()
        def no_hay_barco_boton27c():
            print("Por qué")
            global intentos
            intentos+=1
            boton27c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton27c.place(x=720,y=200)
            return tiro2()

        def barco_hundido_boton28c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton28c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton8c.place(x=750,y=200)
            return tiro1()
        def no_hay_barco_boton28c():
            print("Por qué")
            global intentos
            intentos+=1
            boton28c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton28c.place(x=750,y=200)
            return tiro2()

        def barco_hundido_boton29c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton29c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton29c.place(x=780,y=200)
            return tiro1()
        def no_hay_barco_boton29c():
            print("Por qué")
            global intentos
            intentos+=1
            boton29c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton29c.place(x=780,y=200)
            return tiro2()

        def barco_hundido_boton30c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton30c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton30c.place(x=810,y=200)
            return tiro1()
        def no_hay_barco_boton30c():
            print("Por qué")
            global intentos
            intentos+=1
            boton30c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton30c.place(x=810,y=200)
            return tiro2()

        def barco_hundido_boton31c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton31c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton31c.place(x=540,y=225)
            return tiro1()
        def no_hay_barco_boton31c():
            print("Por qué")
            global intentos
            intentos+=1
            boton31c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton31c.place(x=540,y=225)
            return tiro2()
        
        def barco_hundido_boton32c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton32c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton32c.place(x=570,y=225)
            return tiro1()
        def no_hay_barco_boton32c():
            print("Por qué")
            global intentos
            intentos+=1
            boton32c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton32c.place(x=570,y=225)
            return tiro2()

        def barco_hundido_boton33c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton33c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton33c.place(x=600,y=225)
            return tiro1()
        def no_hay_barco_boton33c():
            print("Por qué")
            global intentos
            intentos+=1
            boton33c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton33c.place(x=600,y=225)
            return tiro2()

        def barco_hundido_boton34c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton34c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton34c.place(x=630,y=225)
            return tiro1()
        def no_hay_barco_boton34c():
            print("Por qué")
            global intentos
            intentos+=1
            boton34c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton34c.place(x=630,y=225)
            return tiro2()

        def barco_hundido_boton35c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton35c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton35c.place(x=660,y=225)
            return tiro1()
        def no_hay_barco_boton35c():
            print("Por qué")
            global intentos
            intentos+=1
            boton35c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton35c.place(x=660,y=225)
            return tiro2()

        def barco_hundido_boton36c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton36c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton36c.place(x=690,y=225)
            return tiro1()
        def no_hay_barco_boton36c():
            print("Por qué")
            global intentos
            intentos+=1
            boton36c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton36c.place(x=690,y=225)
            return tiro2()

        def barco_hundido_boton37c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton37c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton37c.place(x=720,y=225)
            return tiro1()
        def no_hay_barco_boton37c():
            print("Por qué")
            global intentos
            intentos+=1
            boton37c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton37c.place(x=720,y=225)
            return tiro2()

        def barco_hundido_boton38c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton38c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton38c.place(x=750,y=225)
            return tiro1()
        def no_hay_barco_boton38c():
            print("Por qué")
            global intentos
            intentos+=1
            boton38c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton38c.place(x=750,y=225)
            return tiro2()

        def barco_hundido_boton39c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton39c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton39c.place(x=780,y=225)
            return tiro1()
        def no_hay_barco_boton39c():
            print("Por qué")
            global intentos
            intentos+=1
            boton39c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton39c.place(x=780,y=225)
            return tiro2()

        def barco_hundido_boton40c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton40c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton40c.place(x=810,y=225)
            return tiro1()
        def no_hay_barco_boton40c():
            print("Por qué")
            global intentos
            intentos+=1
            boton40c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton40c.place(x=810,y=225)
            return tiro2()

        def barco_hundido_boton41c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton41c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton41c.place(x=540,y=250)
            return tiro1()
        def no_hay_barco_boton41c():
            print("Por qué")
            global intentos
            intentos+=1
            boton41c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton41c.place(x=540,y=250)
            return tiro2()
        
        def barco_hundido_boton42c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton42c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton42c.place(x=570,y=250)
            return tiro1()
        def no_hay_barco_boton42c():
            print("Por qué")
            global intentos
            intentos+=1
            boton42c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton42c.place(x=570,y=250)
            return tiro2()

        def barco_hundido_boton43c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton43c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton43c.place(x=600,y=250)
            return tiro1()
        def no_hay_barco_boton43c():
            print("Por qué")
            global intentos
            intentos+=1
            boton43c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton43c.place(x=600,y=250)
            return tiro2()

        def barco_hundido_boton44c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton44c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton44c.place(x=630,y=250)
            return tiro1()
        def no_hay_barco_boton44c():
            print("Por qué")
            global intentos
            intentos+=1
            boton44c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton44c.place(x=630,y=250)
            return tiro2()

        def barco_hundido_boton45c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton45c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton45c.place(x=660,y=250)
            return tiro1()
        def no_hay_barco_boton45c():
            print("Por qué")
            global intentos
            intentos+=1
            boton45c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton45c.place(x=660,y=250)
            return tiro2()

        def barco_hundido_boton46c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton46c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton46c.place(x=690,y=250)
            return tiro1()
        def no_hay_barco_boton46c():
            print("Por qué")
            global intentos
            intentos+=1
            boton46c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton46c.place(x=690,y=250)
            return tiro2()

        def barco_hundido_boton47c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton47c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton47c.place(x=720,y=250)
            return tiro1()
        def no_hay_barco_boton47c():
            print("Por qué")
            global intentos
            intentos+=1
            boton47c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton47c.place(x=720,y=250)
            return tiro2()

        def barco_hundido_boton48c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton48c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton48c.place(x=750,y=250)
            return tiro1()
        def no_hay_barco_boton48c():
            print("Por qué")
            global intentos
            intentos+=1
            boton48c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton48c.place(x=750,y=250)
            return tiro2()

        def barco_hundido_boton49c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton49c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton49c.place(x=780,y=250)
            return tiro1()
        def no_hay_barco_boton49c():
            print("Por qué")
            global intentos
            intentos+=1
            boton49c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton49c.place(x=780,y=250)
            return tiro2()

        def barco_hundido_boton50c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton50c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton50c.place(x=810,y=250)
            return tiro1()
        def no_hay_barco_boton50c():
            print("Por qué")
            global intentos
            intentos+=1
            boton50c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton50c.place(x=810,y=250)
            return tiro2()

        def barco_hundido_boton51c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton51c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton51c.place(x=540,y=275)
            return tiro1()
        def no_hay_barco_boton51c():
            print("Por qué")
            global intentos
            intentos+=1
            boton51c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton51c.place(x=540,y=275)
            return tiro2()
        
        def barco_hundido_boton52c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton52c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton52c.place(x=570,y=275)
            return tiro1()
        def no_hay_barco_boton52c():
            print("Por qué")
            global intentos
            intentos+=1
            boton52c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton52c.place(x=570,y=275)
            return tiro2()

        def barco_hundido_boton53c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton53c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton53c.place(x=600,y=275)
            return tiro1()
        def no_hay_barco_boton53c():
            print("Por qué")
            global intentos
            intentos+=1
            boton53c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton53c.place(x=600,y=275)
            return tiro2()

        def barco_hundido_boton54c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton54c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton54c.place(x=630,y=275)
            return tiro1()
        def no_hay_barco_boton54c():
            print("Por qué")
            global intentos
            intentos+=1
            boton54c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton54c.place(x=630,y=275)
            return tiro2()

        def barco_hundido_boton55c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton55c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton55c.place(x=660,y=275)
            return tiro1()
        def no_hay_barco_boton52c():
            print("Por qué")
            global intentos
            intentos+=1
            boton55c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton5c.place(x=660,y=275)
            return tiro2()

        def barco_hundido_boton56c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton6c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton6c.place(x=690,y=150)
            return tiro1()
        def no_hay_barco_boton56c():
            print("Por qué")
            global intentos
            intentos+=1
            boton56c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton56c.place(x=690,y=275)
            return tiro2()

        def barco_hundido_boton57c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton57c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton57c.place(x=720,y=275)
            return tiro1()
        def no_hay_barco_boton57c():
            print("Por qué")
            global intentos
            intentos+=1
            boton57c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton7c.place(x=720,y=275)
            return tiro2()

        def barco_hundido_boton58c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton58c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton58c.place(x=750,y=275)
            return tiro1()
        def no_hay_barco_boton58c():
            print("Por qué")
            global intentos
            intentos+=1
            boton58c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton58c.place(x=750,y=275)
            return tiro2()

        def barco_hundido_boton59c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton59c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton59c.place(x=780,y=275)
            return tiro1()
        def no_hay_barco_boton59c():
            print("Por qué")
            global intentos
            intentos+=1
            boton59c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton59c.place(x=780,y=275)
            return tiro2()

        def barco_hundido_boton60c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton60c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton60c.place(x=810,y=275)
            return tiro1()
        def no_hay_barco_boton60c():
            print("Por qué")
            global intentos
            intentos+=1
            boton60c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton10c.place(x=810,y=275)
            return tiro2()

        def barco_hundido_boton61c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton61c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton61c.place(x=540,y=300)
            return tiro1()
        def no_hay_barco_boton61c():
            print("Por qué")
            global intentos
            intentos+=1
            boton61c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton61c.place(x=540,y=300)
            return tiro2()
        
        def barco_hundido_boton62c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton62c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton62c.place(x=570,y=300)
            return tiro1()
        def no_hay_barco_boton62c():
            print("Por qué")
            global intentos
            intentos+=1
            boton62c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton62c.place(x=570,y=300)
            return tiro2()

        def barco_hundido_boton63c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton63c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton63c.place(x=600,y=300)
            return tiro1()
        def no_hay_barco_boton63c():
            print("Por qué")
            global intentos
            intentos+=1
            boton63c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton63c.place(x=600,y=300)
            return tiro2()

        def barco_hundido_boton64c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton64c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton64c.place(x=630,y=300)
            return tiro1()
        def no_hay_barco_boton64c():
            print("Por qué")
            global intentos
            intentos+=1
            boton64c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton64c.place(x=630,y=300)
            return tiro2()

        def barco_hundido_boton65c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton65c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton65c.place(x=660,y=300)
            return tiro1()
        def no_hay_barco_boton65c():
            print("Por qué")
            global intentos
            intentos+=1
            boton65c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton65c.place(x=660,y=300)
            return tiro2()

        def barco_hundido_boton66c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton66c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton66c.place(x=690,y=300)
            return tiro1()
        def no_hay_barco_boton66c():
            print("Por qué")
            global intentos
            intentos+=1
            boton66c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton66c.place(x=690,y=300)
            return tiro2()

        def barco_hundido_boton67c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton67c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton67c.place(x=720,y=300)
            return tiro1()
        def no_hay_barco_boton67c():
            print("Por qué")
            global intentos
            intentos+=1
            boton67c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton67c.place(x=720,y=300)
            return tiro2()

        def barco_hundido_boton68c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton68c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton68c.place(x=750,y=300)
            return tiro1()
        def no_hay_barco_boton68c():
            print("Por qué")
            global intentos
            intentos+=1
            boton68c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton68c.place(x=750,y=300)
            return tiro2()

        def barco_hundido_boton69c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton69c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton69c.place(x=780,y=300)
            return tiro1()
        def no_hay_barco_boton69c():
            print("Por qué")
            global intentos
            intentos+=1
            boton69c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton69c.place(x=780,y=300)
            return tiro2()

        def barco_hundido_boton70c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton70c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton70c.place(x=810,y=300)
            return tiro1()
        def no_hay_barco_boton70c():
            print("Por qué")
            global intentos
            intentos+=1
            boton70c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton70c.place(x=810,y=300)
            return tiro2()

        def barco_hundido_boton71c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton71c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton71c.place(x=540,y=325)
            return tiro1()
        def no_hay_barco_boton71c():
            print("Por qué")
            global intentos
            intentos+=1
            boton71c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton71c.place(x=540,y=325)
            return tiro2()
        
        def barco_hundido_boton72c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton72c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton72c.place(x=570,y=325)
            return tiro1()
        def no_hay_barco_boton72c():
            print("Por qué")
            global intentos
            intentos+=1
            boton72c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton72c.place(x=570,y=325)
            return tiro2()

        def barco_hundido_boton73c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton73c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton73c.place(x=600,y=325)
            return tiro1()
        def no_hay_barco_boton73c():
            print("Por qué")
            global intentos
            intentos+=1
            boton73c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton73c.place(x=600,y=325)
            return tiro2()

        def barco_hundido_boton74c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton74c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton74c.place(x=630,y=325)
            return tiro1()
        def no_hay_barco_boton74c():
            print("Por qué")
            global intentos
            intentos+=1
            boton74c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton74c.place(x=630,y=325)
            return tiro2()

        def barco_hundido_boton75c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton75c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton75c.place(x=660,y=325)
            return tiro1()
        def no_hay_barco_boton75c():
            print("Por qué")
            global intentos
            intentos+=1
            boton75c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton75c.place(x=660,y=325)
            return tiro2()

        def barco_hundido_boton76c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton76c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton76c.place(x=690,y=325)
            return tiro1()
        def no_hay_barco_boton76c():
            print("Por qué")
            global intentos
            intentos+=1
            boton76c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton76c.place(x=690,y=325)
            return tiro2()

        def barco_hundido_boton77c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton77c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton77c.place(x=720,y=325)
            return tiro1()
        def no_hay_barco_boton77c():
            print("Por qué")
            global intentos
            intentos+=1
            boton77c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton77c.place(x=720,y=325)
            return tiro2()

        def barco_hundido_boton78c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton78c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton78c.place(x=750,y=325)
            return tiro1()
        def no_hay_barco_boton78c():
            print("Por qué")
            global intentos
            intentos+=1
            boton78c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton78c.place(x=750,y=325)
            return tiro2()

        def barco_hundido_boton79c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton79c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton79c.place(x=780,y=325)
            return tiro1()
        def no_hay_barco_boton79c():
            print("Por qué")
            global intentos
            intentos+=1
            boton79c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton79c.place(x=780,y=325)
            return tiro2()

        def barco_hundido_boton80c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton80c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton80c.place(x=810,y=325)
            return tiro1()
        def no_hay_barco_boton80c():
            print("Por qué")
            global intentos
            intentos+=1
            boton10c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton10c.place(x=810,y=325)
            return tiro2()

        def barco_hundido_boton81c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton81c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton81c.place(x=540,y=350)
            return tiro1()
        def no_hay_barco_boton81c():
            print("Por qué")
            global intentos
            intentos+=1
            boton81c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton81c.place(x=540,y=350)
            return tiro2()
        
        def barco_hundido_boton82c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton82c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton82c.place(x=570,y=350)
            return tiro1()
        def no_hay_barco_boton82c():
            print("Por qué")
            global intentos
            intentos+=1
            boton82c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton82c.place(x=570,y=350)
            return tiro2()

        def barco_hundido_boton83c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton83c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton83c.place(x=600,y=350)
            return tiro1()
        def no_hay_barco_boton83c():
            print("Por qué")
            global intentos
            intentos+=1
            boton83c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton83c.place(x=600,y=350)
            return tiro2()

        def barco_hundido_boton84c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton84c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton84c.place(x=630,y=350)
            return tiro1()
        def no_hay_barco_boton84c():
            print("Por qué")
            global intentos
            intentos+=1
            boton84c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton84c.place(x=630,y=350)
            return tiro2()

        def barco_hundido_boton85c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton85c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton85c.place(x=660,y=350)
            return tiro1()
        def no_hay_barco_boton85c():
            print("Por qué")
            global intentos
            intentos+=1
            boton85c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton85c.place(x=660,y=350)
            return tiro2()

        def barco_hundido_boton86c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton86c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton86c.place(x=690,y=350)
            return tiro1()
        def no_hay_barco_boton86c():
            print("Por qué")
            global intentos
            intentos+=1
            boton86c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton86c.place(x=690,y=350)
            return tiro2()

        def barco_hundido_boton87c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton87c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton87c.place(x=720,y=350)
            return tiro1()
        def no_hay_barco_boton87c():
            print("Por qué")
            global intentos
            intentos+=1
            boton87c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton87c.place(x=720,y=350)
            return tiro2()

        def barco_hundido_boton88c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton88c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton88c.place(x=750,y=350)
            return tiro1()
        def no_hay_barco_boton88c():
            print("Por qué")
            global intentos
            intentos+=1
            boton88c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton88c.place(x=750,y=350)
            return tiro2()

        def barco_hundido_boton89c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton89c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton89c.place(x=780,y=350)
            return tiro1()
        def no_hay_barco_boton89c():
            print("Por qué")
            global intentos
            intentos+=1
            boton89c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton89c.place(x=780,y=350)
            return tiro2()

        def barco_hundido_boton90c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton90c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton90c.place(x=810,y=350)
            return tiro1()
        def no_hay_barco_boton90c():
            print("Por qué")
            global intentos
            intentos+=1
            boton90c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton90c.place(x=810,y=350)
            return tiro2()

        def barco_hundido_boton91c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton91c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton91c.place(x=540,y=375)
            return tiro1()
        def no_hay_barco_boton91c():
            print("Por qué")
            global intentos
            intentos+=1
            boton91c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton91c.place(x=540,y=375)
            return tiro2()
        
        def barco_hundido_boton92c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton92c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton92c.place(x=570,y=375)
            return tiro1()
        def no_hay_barco_boton92c():
            print("Por qué")
            global intentos
            intentos+=1
            boton92c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton92c.place(x=570,y=375)
            return tiro2()

        def barco_hundido_boton93c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton93c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton93c.place(x=600,y=375)
            return tiro1()
        def no_hay_barco_boton93c():
            print("Por qué")
            global intentos
            intentos+=1
            boton93c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton93c.place(x=600,y=375)
            return tiro2()

        def barco_hundido_boton94c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton94c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton94c.place(x=630,y=375)
            return tiro1()
        def no_hay_barco_boton94c():
            print("Por qué")
            global intentos
            intentos+=1
            boton94c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton94c.place(x=630,y=375)
            return tiro2()

        def barco_hundido_boton95c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton95c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton95c.place(x=660,y=375)
            return tiro1()
        def no_hay_barco_boton95c():
            print("Por qué")
            global intentos
            intentos+=1
            boton95c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton95c.place(x=660,y=375)
            return tiro2()

        def barco_hundido_boton96c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton96c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton96c.place(x=690,y=375)
            return tiro1()
        def no_hay_barco_boton96c():
            print("Por qué")
            global intentos
            intentos+=1
            boton96c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton96c.place(x=690,y=375)
            return tiro2()

        def barco_hundido_boton97c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton97c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton97c.place(x=720,y=375)
            return tiro1()
        def no_hay_barco_boton97c():
            print("Por qué")
            global intentos
            intentos+=1
            boton97c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton97c.place(x=720,y=375)
            return tiro2()

        def barco_hundido_boton98c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton98c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton98c.place(x=750,y=375)
            return tiro1()
        def no_hay_barco_boton98c():
            print("Por qué")
            global intentos
            intentos+=1
            boton98c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton98c.place(x=750,y=375)
            return tiro2()

        def barco_hundido_boton99c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton99c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton99c.place(x=780,y=375)
            return tiro1()
        def no_hay_barco_boton99c():
            print("Por qué")
            global intentos
            intentos+=1
            boton99c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton99c.place(x=780,y=375)
            return tiro2()

        def barco_hundido_boton100c():
            print ("Entró")
            global aciertos
            global intentos
            aciertos+=1
            intentos+=1
            boton100c= Button(nuevo_juego,text= "       ", image= imagen4,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton100c.place(x=810,y=375)
            return tiro1()
        def no_hay_barco_boton100c():
            print("Por qué")
            global intentos
            intentos+=1
            boton100c= Button(nuevo_juego,text= "       ", image= imagen5,command=empezar_juego(intentos,aciertos), bg = "blue")
            boton100c.place(x=810,y=375)
            return tiro2()


        def jugar():
            global naves
            if naves == int(entrada2.get()):
                return empezar_juego(aciertos,intentos)
            else:
                return jugar_aux()
        
        def jugar_aux():
            ñ= random.choice([poner_barcos_boton1c,poner_barcos_boton2c,poner_barcos_boton3c,poner_barcos_boton4c,poner_barcos_boton5c,poner_barcos_boton6c,poner_barcos_boton7c,poner_barcos_boton8c,poner_barcos_boton9c,poner_barcos_boton10c,poner_barcos_boton11c,poner_barcos_boton12c,poner_barcos_boton13c,poner_barcos_boton14c,poner_barcos_boton15c,poner_barcos_boton16c,poner_barcos_boton17c,poner_barcos_boton18c,poner_barcos_boton19c,poner_barcos_boton20c,poner_barcos_boton21c,poner_barcos_boton22c,poner_barcos_boton23c,poner_barcos_boton24c,poner_barcos_boton25c,poner_barcos_boton26c,poner_barcos_boton27c,poner_barcos_boton28c,poner_barcos_boton29c,poner_barcos_boton30c,poner_barcos_boton31c,poner_barcos_boton32c,poner_barcos_boton33c,poner_barcos_boton34c,poner_barcos_boton35c,poner_barcos_boton36c,poner_barcos_boton37c,poner_barcos_boton38c,poner_barcos_boton39c, poner_barcos_boton40c,poner_barcos_boton41c,poner_barcos_boton42c,poner_barcos_boton43c,poner_barcos_boton44c,poner_barcos_boton45c,poner_barcos_boton46c,poner_barcos_boton47c,poner_barcos_boton48c,poner_barcos_boton49c,poner_barcos_boton50c,poner_barcos_boton51c,poner_barcos_boton52c,poner_barcos_boton53c,poner_barcos_boton54c,poner_barcos_boton55c,poner_barcos_boton56c,poner_barcos_boton57c,poner_barcos_boton58c,poner_barcos_boton59c,poner_barcos_boton60c,poner_barcos_boton61c,poner_barcos_boton62c,poner_barcos_boton63c,poner_barcos_boton64c,poner_barcos_boton65c,poner_barcos_boton66c,poner_barcos_boton67c,poner_barcos_boton68c,poner_barcos_boton69c,poner_barcos_boton70c,poner_barcos_boton71c,poner_barcos_boton72c,poner_barcos_boton73c,poner_barcos_boton74c,poner_barcos_boton75c, poner_barcos_boton76c,poner_barcos_boton77c,poner_barcos_boton78c,poner_barcos_boton79c,poner_barcos_boton80c,poner_barcos_boton81c, poner_barcos_boton82c,poner_barcos_boton83c,poner_barcos_boton84c,poner_barcos_boton85c,poner_barcos_boton86c,poner_barcos_boton87c,poner_barcos_boton88c,poner_barcos_boton89c,poner_barcos_boton90c,poner_barcos_boton91c, poner_barcos_boton92c,poner_barcos_boton93c,poner_barcos_boton94c,poner_barcos_boton95c,poner_barcos_boton96c,poner_barcos_boton97c,poner_barcos_boton98c,poner_barcos_boton99c,poner_barcos_boton100c])
            print (ñ())
            global conta
            naves+=1
            return jugar()
        
        #Matriz Computadora
        def poner_barcos_boton1c():    
            boton1c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton1c.place(x=540,y=150)
        def poner_barcos_boton2c(): 
            boton2c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton2c.place(x=570,y=150)
        def poner_barcos_boton3c(): 
            boton3c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton3c.place(x=600,y=150)
        def poner_barcos_boton4c(): 
            boton4c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton4c.place(x=630,y=150)
        def poner_barcos_boton5c(): 
            boton5c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton5c.place(x=660,y=150)
        def poner_barcos_boton6c(): 
            boton6c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton6c.place(x=690,y=150)
        def poner_barcos_boton7c(): 
            boton7c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton7c.place(x=720,y=150)
        def poner_barcos_boton8c(): 
            boton8c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton8c.place(x=750,y=150)
        def poner_barcos_boton9c(): 
            boton9c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton9c.place(x=780,y=150)
        def poner_barcos_boton10c(): 
            boton10c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton10c.place(x=810,y=150)
        def poner_barcos_boton11c(): 
            boton11c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton11c.place(x=540,y=175)
        def poner_barcos_boton12c(): 
            boton12c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton12c.place(x=570,y=175)
        def poner_barcos_boton13c(): 
            boton13c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton13c.place(x=600,y=175)
        def poner_barcos_boton14c(): 
            boton14c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton14c.place(x=630,y=175)
        def poner_barcos_boton15c(): 
            boton15c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton15c.place(x=660,y=175)
        def poner_barcos_boton16c(): 
            boton16c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton16c.place(x=690,y=175)
        def poner_barcos_boton17c(): 
            boton17c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton17c.place(x=720,y=175)
        def poner_barcos_boton18c(): 
            boton18c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton18c.place(x=750,y=175)
        def poner_barcos_boton19c(): 
            boton19c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton19c.place(x=780,y=175)
        def poner_barcos_boton20c(): 
            boton20c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton20c.place(x=810,y=175)
        def poner_barcos_boton21c(): 
            boton21c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton21c.place(x=540,y=200)
        def poner_barcos_boton22c(): 
            boton22c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton22c.place(x=570,y=200)
        def poner_barcos_boton23c(): 
            boton23c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton23c.place(x=600,y=200)
        def poner_barcos_boton24c(): 
            boton24c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton24c.place(x=630,y=200)
        def poner_barcos_boton25c(): 
            boton25c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton25c.place(x=660,y=200)
        def poner_barcos_boton26c(): 
            boton26c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton26c.place(x=690,y=200)
        def poner_barcos_boton27c(): 
            boton27c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton27c.place(x=720,y=200)
        def poner_barcos_boton28c(): 
            boton28c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton28c.place(x=750,y=200)
        def poner_barcos_boton29c(): 
            boton29c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton29c.place(x=780,y=200)
        def poner_barcos_boton30c(): 
            boton30c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton30c.place(x=810,y=200)
        def poner_barcos_boton31c(): 
            boton31c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton31c.place(x=540,y=225)
        def poner_barcos_boton32c(): 
            boton32c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton32c.place(x=570,y=225)
        def poner_barcos_boton33c(): 
            boton33c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton33c.place(x=600,y=225)
        def poner_barcos_boton34c(): 
            boton34c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton34c.place(x=630,y=225)
        def poner_barcos_boton35c(): 
            boton35c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton35c.place(x=660,y=225)
        def poner_barcos_boton36c(): 
            boton36c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton36c.place(x=690,y=225)
        def poner_barcos_boton37c(): 
            boton37c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton37c.place(x=720,y=225)
        def poner_barcos_boton38c(): 
            boton38c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton38c.place(x=750,y=225)
        def poner_barcos_boton39c(): 
            boton39c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton39c.place(x=780,y=225)
        def poner_barcos_boton40c(): 
            boton40c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton40c.place(x=810,y=225)
        def poner_barcos_boton41c(): 
            boton41c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton41c.place(x=540,y=250)
        def poner_barcos_boton42c(): 
            boton42c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton42c.place(x=570,y=250)
        def poner_barcos_boton43c(): 
            boton43c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton43c.place(x=600,y=250)
        def poner_barcos_boton44c(): 
            boton44c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton44c.place(x=630,y=250)
        def poner_barcos_boton45c(): 
            boton45c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton45c.place(x=660,y=250)
        def poner_barcos_boton46c(): 
            boton46c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton46c.place(x=690,y=250)
        def poner_barcos_boton47c(): 
            boton47c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton47c.place(x=720,y=250)
        def poner_barcos_boton48c(): 
            boton48c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton48c.place(x=750,y=250)
        def poner_barcos_boton49c(): 
            boton49c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton49c.place(x=780,y=250)
        def poner_barcos_boton50c(): 
            boton50c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton50c.place(x=810,y=250)
        def poner_barcos_boton51c(): 
            boton51c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton51c.place(x=540,y=275)
        def poner_barcos_boton52c(): 
            boton52c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton52c.place(x=570,y=275)
        def poner_barcos_boton53c(): 
            boton53c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton53c.place(x=600,y=275)
        def poner_barcos_boton54c(): 
            boton54c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton54c.place(x=630,y=275)
        def poner_barcos_boton55c(): 
            boton55c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton55c.place(x=660,y=275)
        def poner_barcos_boton56c(): 
            boton56c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton56c.place(x=690,y=275)
        def poner_barcos_boton57c(): 
            boton57c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton57c.place(x=720,y=275)
        def poner_barcos_boton58c(): 
            boton58c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton58c.place(x=750,y=275)
        def poner_barcos_boton59c(): 
            boton59c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton59c.place(x=780,y=275)
        def poner_barcos_boton60c(): 
            boton60c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton60c.place(x=810,y=275)
        def poner_barcos_boton61c(): 
            boton61c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton61c.place(x=540,y=300)
        def poner_barcos_boton62c(): 
            boton62c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton62c.place(x=570,y=300)
        def poner_barcos_boton63c(): 
            boton63c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton63c.place(x=600,y=300)
        def poner_barcos_boton64c(): 
            boton64c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton64c.place(x=630,y=300)
        def poner_barcos_boton65c(): 
            boton65c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton65c.place(x=660,y=300)
        def poner_barcos_boton66c(): 
            boton66c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton66c.place(x=690,y=300)
        def poner_barcos_boton67c(): 
            boton67c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton67c.place(x=720,y=300)
        def poner_barcos_boton68c(): 
            boton68c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton68c.place(x=750,y=300)
        def poner_barcos_boton69c(): 
            boton69c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton69c.place(x=780,y=300)
        def poner_barcos_boton70c(): 
            boton70c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton70c.place(x=810,y=300)
        def poner_barcos_boton71c(): 
            boton71c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton71c.place(x=540,y=325)
        def poner_barcos_boton72c(): 
            boton72c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton72c.place(x=570,y=325)
        def poner_barcos_boton73c(): 
            boton73c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton73c.place(x=600,y=325)
        def poner_barcos_boton74c(): 
            boton74c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton74c.place(x=630,y=325)
        def poner_barcos_boton75c(): 
            boton75c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton75c.place(x=660,y=325)
        def poner_barcos_boton76c(): 
            boton76c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton76c.place(x=690,y=325)
        def poner_barcos_boton77c(): 
            boton77c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton77c.place(x=720,y=325)
        def poner_barcos_boton78c(): 
            boton78c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton78c.place(x=750,y=325)
        def poner_barcos_boton79c(): 
            boton79c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton79c.place(x=780,y=325)
        def poner_barcos_boton80c(): 
            boton80c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton80c.place(x=810,y=325)
        def poner_barcos_boton81c(): 
            boton81c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton81c.place(x=540,y=350)
        def poner_barcos_boton82c(): 
            boton82c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton82c.place(x=570,y=350)
        def poner_barcos_boton83c(): 
            boton83c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton83c.place(x=600,y=350)
        def poner_barcos_boton84c(): 
            boton84c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton84c.place(x=630,y=350)
        def poner_barcos_boton85c(): 
            boton85c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton85c.place(x=660,y=350)
        def poner_barcos_boton86c(): 
            boton86c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton86c.place(x=690,y=350)
        def poner_barcos_boton87c(): 
            boton87c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton87c.place(x=720,y=350)
        def poner_barcos_boton88c(): 
            boton88c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton88c.place(x=750,y=350)
        def poner_barcos_boton89c(): 
            boton89c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton89c.place(x=780,y=350)
        def poner_barcos_boton90c(): 
            boton90c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton90c.place(x=810,y=350)
        def poner_barcos_boton91c(): 
            boton91c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton91c.place(x=540,y=375)
        def poner_barcos_boton92c(): 
            boton92c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton92c.place(x=570,y=375)
        def poner_barcos_boton93c(): 
            boton93c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton93c.place(x=600,y=375)
        def poner_barcos_boton94c(): 
            boton94c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton94c.place(x=630,y=375)
        def poner_barcos_boton95c(): 
            boton95c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton95c.place(x=660,y=375)
        def poner_barcos_boton96c(): 
            boton96c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton96c.place(x=690,y=375)
        def poner_barcos_boton97c(): 
            boton97c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton97c.place(x=720,y=375)
        def poner_barcos_boton98c(): 
            boton98c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton98c.place(x=750,y=375)
        def poner_barcos_boton99c(): 
            boton99c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton99c.place(x=780,y=375)
        def poner_barcos_boton100c(): 
            boton100c = Button(naves, text="       ", image=imagen3, bg = "blue")
            boton100c.place(x=810,y=375)

        #se cargan las imagenes de los botones
        imagen3 = cargarImagen("barcolisto.gif")
        imagen4=cargarImagen("barcodisparado.gif")
        imagen5=cargarImagen("mar.gif")
    
        def poner_barcos_boton1j():
            global conta
            conta+=1
            boton1j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton1j.place(x=50,y=150)
        def poner_barcos_boton2j():
            global conta
            conta+=1
            boton2j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton2j.place(x=80,y=150)
        def poner_barcos_boton3j():
            global conta
            conta+=1
            boton3j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton3j.place(x=110,y=150)
        def poner_barcos_boton4j():
            global conta
            conta+=1
            boton4j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton4j.place(x=140,y=150)
        def poner_barcos_boton5j():
            global conta
            conta+=1
            boton5j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton5j.place(x=170,y=150)
        def poner_barcos_boton6j():
            global conta
            conta+=1
            boton6j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton6j.place(x=200,y=150)
        def poner_barcos_boton7j():
            global conta
            conta+=1
            boton7j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton7j.place(x=230,y=150)
        def poner_barcos_boton8j():
            global conta
            conta+=1
            boton8j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton8j.place(x=260,y=150)
        def poner_barcos_boton9j():
            global conta
            conta+=1
            boton9j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton9j.place(x=290,y=150)
        def poner_barcos_boton10j():
            global conta
            conta+=1
            boton10j = Button(naves, text="       ",image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton10j.place(x=320,y=150)
        def poner_barcos_boton11j():
            global conta
            conta+=1
            boton11j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton11j.place(x=50,y=175)
        def poner_barcos_boton12j():
            global conta
            conta+=1
            boton12j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton12j.place(x=80,y=175)
        def poner_barcos_boton13j():
            global conta
            conta+=1
            boton13j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton13j.place(x=110,y=175)
        def poner_barcos_boton14j():
            global conta
            conta+=1
            boton14j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton14j.place(x=140,y=175)
        def poner_barcos_boton15j():
            global conta
            conta+=1
            boton15j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton15j.place(x=170,y=175)
        def poner_barcos_boton16j():
            global conta
            conta+=1
            boton16j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton16j.place(x=200,y=175)
        def poner_barcos_boton17j():
            global conta
            conta+=1
            boton17j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton17j.place(x=230,y=175)
        def poner_barcos_boton18j():
            global conta
            conta+=1
            boton18j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton18j.place(x=260,y=175)
        def poner_barcos_boton19j():
            global conta
            conta+=1
            boton19j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton19j.place(x=290,y=175)
        def poner_barcos_boton20j():
            global conta
            conta+=1
            boton20j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton20j.place(x=320,y=175)
        def poner_barcos_boton21j():
            global conta
            conta+=1
            boton21j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton21j.place(x=50,y=200)
        def poner_barcos_boton22j():
            global conta
            conta+=1            
            boton22j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton22j.place(x=80,y=200)
        def poner_barcos_boton23j():
            global conta
            conta+=1
            boton23j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton23j.place(x=110,y=200)
        def poner_barcos_boton24j():
            global conta
            conta+=1
            boton24j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton24j.place(x=140,y=200)
        def poner_barcos_boton25j():
            global conta
            conta+=1
            boton25j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton25j.place(x=170,y=200)
        def poner_barcos_boton26j():
            global conta
            conta+=1
            boton26j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton26j.place(x=200,y=200)
        def poner_barcos_boton27j():
            global conta
            conta+=1
            boton27j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton27j.place(x=230,y=200)
        def poner_barcos_boton28j():
            global conta
            conta+=1
            boton28j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton28j.place(x=260,y=200)
        def poner_barcos_boton29j():
            global conta
            conta+=1
            boton29j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton29j.place(x=290,y=200)
        def poner_barcos_boton30j():
            global conta
            conta+=1
            boton30j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton30j.place(x=320,y=200)
        def poner_barcos_boton31j():
            global conta
            conta+=1
            boton31j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton31j.place(x=50,y=225)
        def poner_barcos_boton32j():
            global conta
            conta+=1
            boton32j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton32j.place(x=80,y=225)
        def poner_barcos_boton33j():
            global conta
            conta+=1
            boton33j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton33j.place(x=110,y=225)
        def poner_barcos_boton34j():
            global conta
            conta+=1
            boton34j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton34j.place(x=140,y=225)
        def poner_barcos_boton35j():
            global conta
            conta+=1
            boton35j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton35j.place(x=170,y=225)
        def poner_barcos_boton36j(): 
            global conta
            conta+=1
            boton36j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton36j.place(x=200,y=225)
        def poner_barcos_boton37j():
            global conta
            conta+=1
            boton37j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton37j.place(x=230,y=225)
        def poner_barcos_boton38j():
            global conta
            conta+=1
            boton38j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton38j.place(x=260,y=225)
        def poner_barcos_boton39j():
            global conta
            conta+=1
            boton39j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton39j.place(x=290,y=225)
        def poner_barcos_boton40j():
            global conta
            conta+=1
            boton40j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton40j.place(x=320,y=225)
        def poner_barcos_boton41j():
            global conta
            conta+=1
            boton41j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton41j.place(x=50,y=250)
        def poner_barcos_boton42j():
            global conta
            conta+=1
            boton42j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton42j.place(x=80,y=250)
        def poner_barcos_boton43j():
            global conta
            conta+=1
            boton43j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton43j.place(x=110,y=250)
        def poner_barcos_boton44j():
            global conta
            conta+=1
            boton44j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton44j.place(x=140,y=250)
        def poner_barcos_boton45j():
            global conta
            conta+=1
            boton45j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton45j.place(x=170,y=250)
        def poner_barcos_boton46j():
            global conta
            conta+=1
            boton46j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton46j.place(x=200,y=250)
        def poner_barcos_boton47j():
            global conta
            conta+=1
            boton47j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton47j.place(x=230,y=250)
        def poner_barcos_boton48j():
            global conta
            conta+=1
            boton48j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton48j.place(x=260,y=250)
        def poner_barcos_boton49j():
            global conta
            conta+=1
            boton49j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton49j.place(x=290,y=250)
        def poner_barcos_boton50j():
            global conta
            conta+=1
            boton50j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton50j.place(x=320,y=250)
        def poner_barcos_boton51j():
            global conta
            conta+=1
            boton51j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton51j.place(x=50,y=275)
        def poner_barcos_boton52j():
            global conta
            conta+=1
            boton52j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton52j.place(x=80,y=275)
        def poner_barcos_boton53j():
            global conta
            conta+=1
            boton53j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton53j.place(x=110,y=275)
        def poner_barcos_boton54j():
            global conta
            conta+=1
            boton54j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton54j.place(x=140,y=275)
        def poner_barcos_boton55j():
            global conta
            conta+=1
            boton55j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton55j.place(x=170,y=275)
        def poner_barcos_boton56j():
            global conta
            conta+=1
            boton56j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton56j.place(x=200,y=275)
        def poner_barcos_boton57j():
            global conta
            conta+=1
            boton57j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton57j.place(x=230,y=275)
        def poner_barcos_boton58j():
            global conta
            conta+=1
            boton58j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton58j.place(x=260,y=275)
        def poner_barcos_boton59j():
            global conta
            conta+=1
            boton59j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton59j.place(x=290,y=275)
        def poner_barcos_boton60j():
            global conta
            conta+=1
            boton60j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton60j.place(x=320,y=275)
        def poner_barcos_boton61j():
            global conta
            conta+=1
            boton61j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton61j.place(x=50,y=300)
        def poner_barcos_boton62j():
            global conta
            conta+=1
            boton62j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton62j.place(x=80,y=300)
        def poner_barcos_boton63j():
            global conta
            conta+=1
            boton63j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton63j.place(x=110,y=300)
        def poner_barcos_boton64j():
            global conta
            conta+=1
            boton64j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton64j.place(x=140,y=300)
        def poner_barcos_boton65j():
            global conta
            conta+=1
            boton65j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton65j.place(x=170,y=300)
        def poner_barcos_boton66j():
            global conta
            conta+=1
            boton66j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton66j.place(x=200,y=300)
        def poner_barcos_boton67j():
            global conta
            conta+=1
            boton67j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton67j.place(x=230,y=300)
        def poner_barcos_boton68j():
            global conta
            conta+=1
            boton68j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton68j.place(x=260,y=300)
        def poner_barcos_boton69j():
            global conta
            conta+=1
            boton69j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton69j.place(x=290,y=300)
        def poner_barcos_boton70j():
            global conta
            conta+=1
            boton70j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton70j.place(x=320,y=300)
        def poner_barcos_boton71j():
            global conta
            conta+=1
            boton71j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton71j.place(x=50,y=325)
        def poner_barcos_boton72j():
            global conta
            conta+=1
            boton72j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton72j.place(x=80,y=325)
        def poner_barcos_boton73j():
            global conta
            conta+=1
            boton73j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton73j.place(x=110,y=325)
        def poner_barcos_boton74j():
            global conta
            conta+=1
            boton74j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton74j.place(x=140,y=325)
        def poner_barcos_boton75j():
            global conta
            conta+=1
            boton75j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton75j.place(x=170,y=325)
        def poner_barcos_boton76j():
            global conta
            conta+=1
            boton76j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton76j.place(x=200,y=325)
        def poner_barcos_boton77j():
            global conta
            conta+=1
            boton77j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton77j.place(x=230,y=325)
        def poner_barcos_boton78j():
            global conta
            conta+=1
            boton78j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton78j.place(x=260,y=325)
        def poner_barcos_boton79j():
            global conta
            conta+=1
            boton79j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton79j.place(x=290,y=325)
        def poner_barcos_boton80j():
            global conta
            conta+=1
            boton80j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton80j.place(x=320,y=325)
        def poner_barcos_boton81j():
            global conta
            conta+=1
            boton81j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton81j.place(x=50,y=350)
        def poner_barcos_boton82j():
            global conta
            conta+=1
            boton82j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton82j.place(x=80,y=350)
        def poner_barcos_boton83j():
            global conta
            conta+=1
            boton83j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton83j.place(x=110,y=350)
        def poner_barcos_boton84j():
            global conta
            conta+=1
            boton84j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton84j.place(x=140,y=350)
        def poner_barcos_boton85j():
            global conta
            conta+=1
            boton85j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton85j.place(x=170,y=350)
        def poner_barcos_boton86j():
            global conta
            conta+=1
            boton86j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton86j.place(x=200,y=350)
        def poner_barcos_boton87j():
            global conta
            conta+=1
            boton87j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton87j.place(x=230,y=350)
        def poner_barcos_boton88j():
            global conta
            conta+=1
            boton88j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton88j.place(x=260,y=350)
        def poner_barcos_boton89j():
            global conta
            conta+=1
            boton89j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton89j.place(x=290,y=350)
        def poner_barcos_boton90j():
            global conta
            conta+=1
            boton90j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton90j.place(x=320,y=350)
        def poner_barcos_boton91j():
            global conta
            conta+=1
            boton91j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton91j.place(x=50,y=375)
        def poner_barcos_boton92j():
            global conta
            conta+=1
            boton92j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton92j.place(x=80,y=375)
        def poner_barcos_boton93j():
            global conta
            conta+=1
            boton93j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton93j.place(x=110,y=375)
        def poner_barcos_boton94j():
            global conta
            conta+=1
            boton94j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton94j.place(x=140,y=375)
        def poner_barcos_boton95j():
            global conta
            conta+=1
            boton95j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton95j.place(x=170,y=375)
        def poner_barcos_boton96j():
            global conta
            conta+=1
            boton96j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton96j.place(x=200,y=375)
        def poner_barcos_boton97j():
            global conta
            conta+=1
            boton97j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton97j.place(x=230,y=375)
        def poner_barcos_boton98j():
            global conta
            conta+=1
            boton98j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton98j.place(x=260,y=375)
        def poner_barcos_boton99j():
            global conta
            conta+=1
            boton99j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton99j.place(x=290,y=375)
        def poner_barcos_boton100j():
            global conta
            conta+=1
            boton100j = Button(naves, text="       ", image=imagen3,command=comparar_aux(int(entrada2.get())), bg = "blue")
            boton100j.place(x=320,y=375)


    

        #Matriz Jugador
        boton1j = Button(naves, text="       ", comman=poner_barcos_boton1j, bg = "blue")
        boton1j.place(x=50,y=150)
        boton2j = Button(naves, text="       ", command=poner_barcos_boton2j, bg = "blue")
        boton2j.place(x=80,y=150)
        boton3j = Button(naves, text="       ", command=poner_barcos_boton3j, bg = "blue")
        boton3j.place(x=110,y=150)
        boton4j = Button(naves, text="       ", command=poner_barcos_boton4j, bg = "blue")
        boton4j.place(x=140,y=150)
        boton5j = Button(naves, text="       ", command=poner_barcos_boton5j, bg = "blue")
        boton5j.place(x=170,y=150)
        boton6j = Button(naves, text="       ", command=poner_barcos_boton6j, bg = "blue")
        boton6j.place(x=200,y=150)
        boton7j = Button(naves, text="       ", command=poner_barcos_boton7j, bg = "blue")
        boton7j.place(x=230,y=150)
        boton8j = Button(naves, text="       ", command=poner_barcos_boton8j, bg = "blue")
        boton8j.place(x=260,y=150)
        boton9j = Button(naves, text="       ", command=poner_barcos_boton9j, bg = "blue")
        boton9j.place(x=290,y=150)
        boton10j = Button(naves, text="       ", command=poner_barcos_boton10j, bg = "blue")
        boton10j.place(x=320,y=150)
        boton11j = Button(naves, text="       ", command=poner_barcos_boton11j, bg = "blue")
        boton11j.place(x=50,y=175)
        boton12j = Button(naves, text="       ", command=poner_barcos_boton12j, bg = "blue")
        boton12j.place(x=80,y=175)
        boton13j = Button(naves, text="       ", command=poner_barcos_boton13j, bg = "blue")
        boton13j.place(x=110,y=175)
        boton14j = Button(naves, text="       ", command=poner_barcos_boton14j, bg = "blue")
        boton14j.place(x=140,y=175)
        boton15j = Button(naves, text="       ", command=poner_barcos_boton15j, bg = "blue")
        boton15j.place(x=170,y=175)
        boton16j = Button(naves, text="       ", command=poner_barcos_boton16j, bg = "blue")
        boton16j.place(x=200,y=175)
        boton17j = Button(naves, text="       ", command=poner_barcos_boton17j, bg = "blue")
        boton17j.place(x=230,y=175)
        boton18j = Button(naves, text="       ", command=poner_barcos_boton18j, bg = "blue")
        boton18j.place(x=260,y=175)
        boton19j = Button(naves, text="       ", command=poner_barcos_boton19j, bg = "blue")
        boton19j.place(x=290,y=175)
        boton20j = Button(naves, text="       ", command=poner_barcos_boton20j, bg = "blue")
        boton20j.place(x=320,y=175)
        boton21j = Button(naves, text="       ", command=poner_barcos_boton21j, bg = "blue")
        boton21j.place(x=50,y=200)
        boton22j = Button(naves, text="       ", command=poner_barcos_boton22j, bg = "blue")
        boton22j.place(x=80,y=200)
        boton23j = Button(naves, text="       ", command=poner_barcos_boton23j, bg = "blue")
        boton23j.place(x=110,y=200)
        boton24j = Button(naves, text="       ", command=poner_barcos_boton24j, bg = "blue")
        boton24j.place(x=140,y=200)
        boton25j = Button(naves, text="       ", command=poner_barcos_boton25j, bg = "blue")
        boton25j.place(x=170,y=200)
        boton26j = Button(naves, text="       ", command=poner_barcos_boton26j, bg = "blue")
        boton26j.place(x=200,y=200)
        boton27j = Button(naves, text="       ", command=poner_barcos_boton27j, bg = "blue")
        boton27j.place(x=230,y=200)
        boton28j = Button(naves, text="       ", command=poner_barcos_boton28j, bg = "blue")
        boton28j.place(x=260,y=200)
        boton29j = Button(naves, text="       ", command=poner_barcos_boton29j, bg = "blue")
        boton29j.place(x=290,y=200)
        boton30j = Button(naves, text="       ", command=poner_barcos_boton30j, bg = "blue")
        boton30j.place(x=320,y=200)
        boton31j = Button(naves, text="       ", command=poner_barcos_boton31j, bg = "blue")
        boton31j.place(x=50,y=225)
        boton32j = Button(naves, text="       ", command=poner_barcos_boton32j, bg = "blue")
        boton32j.place(x=80,y=225)
        boton33j = Button(naves, text="       ", command=poner_barcos_boton33j, bg = "blue")
        boton33j.place(x=110,y=225)
        boton34j = Button(naves, text="       ", command=poner_barcos_boton34j, bg = "blue")
        boton34j.place(x=140,y=225)
        boton35j = Button(naves, text="       ", command=poner_barcos_boton35j, bg = "blue")
        boton35j.place(x=170,y=225)
        boton36j = Button(naves, text="       ", command=poner_barcos_boton36j, bg = "blue")
        boton36j.place(x=200,y=225)
        boton37j = Button(naves, text="       ", command=poner_barcos_boton37j, bg = "blue")
        boton37j.place(x=230,y=225)
        boton38j = Button(naves, text="       ", command=poner_barcos_boton38j, bg = "blue")
        boton38j.place(x=260,y=225)
        boton39j = Button(naves, text="       ", command=poner_barcos_boton39j, bg = "blue")
        boton39j.place(x=290,y=225)
        boton40j = Button(naves, text="       ", command=poner_barcos_boton40j, bg = "blue")
        boton40j.place(x=320,y=225)
        boton41j = Button(naves, text="       ", command=poner_barcos_boton41j, bg = "blue")
        boton41j.place(x=50,y=250)
        boton42j = Button(naves, text="       ", command=poner_barcos_boton42j, bg = "blue")
        boton42j.place(x=80,y=250)
        boton43j = Button(naves, text="       ", command=poner_barcos_boton43j, bg = "blue")
        boton43j.place(x=110,y=250)
        boton44j = Button(naves, text="       ", command=poner_barcos_boton44j, bg = "blue")
        boton44j.place(x=140,y=250)
        boton45j = Button(naves, text="       ", command=poner_barcos_boton45j, bg = "blue")
        boton45j.place(x=170,y=250)
        boton46j = Button(naves, text="       ", command=poner_barcos_boton46j, bg = "blue")
        boton46j.place(x=200,y=250)
        boton47j = Button(naves, text="       ", command=poner_barcos_boton47j, bg = "blue")
        boton47j.place(x=230,y=250)
        boton48j = Button(naves, text="       ", command=poner_barcos_boton48j, bg = "blue")
        boton48j.place(x=260,y=250)
        boton49j = Button(naves, text="       ", command=poner_barcos_boton49j, bg = "blue")
        boton49j.place(x=290,y=250)
        boton50j = Button(naves, text="       ", command=poner_barcos_boton50j, bg = "blue")
        boton50j.place(x=320,y=250)
        boton51j = Button(naves, text="       ", command=poner_barcos_boton51j, bg = "blue")
        boton51j.place(x=50,y=275)
        boton52j = Button(naves, text="       ", command=poner_barcos_boton52j, bg = "blue")
        boton52j.place(x=80,y=275)
        boton53j = Button(naves, text="       ", command=poner_barcos_boton53j, bg = "blue")
        boton53j.place(x=110,y=275)
        boton54j = Button(naves, text="       ", command=poner_barcos_boton54j, bg = "blue")
        boton54j.place(x=140,y=275)
        boton55j = Button(naves, text="       ", command=poner_barcos_boton55j, bg = "blue")
        boton55j.place(x=170,y=275)
        boton56j = Button(naves, text="       ", command=poner_barcos_boton56j, bg = "blue")
        boton56j.place(x=200,y=275)
        boton57j = Button(naves, text="       ", command=poner_barcos_boton57j, bg = "blue")
        boton57j.place(x=230,y=275)
        boton58j = Button(naves, text="       ", command=poner_barcos_boton58j, bg = "blue")
        boton58j.place(x=260,y=275)
        boton59j = Button(naves, text="       ", command=poner_barcos_boton59j, bg = "blue")
        boton59j.place(x=290,y=275)
        boton60j = Button(naves, text="       ", command=poner_barcos_boton60j, bg = "blue")
        boton60j.place(x=320,y=275)
        boton61j = Button(naves, text="       ", command=poner_barcos_boton61j, bg = "blue")
        boton61j.place(x=50,y=300)
        boton62j = Button(naves, text="       ", command=poner_barcos_boton62j, bg = "blue")
        boton62j.place(x=80,y=300)
        boton63j = Button(naves, text="       ", command=poner_barcos_boton63j, bg = "blue")
        boton63j.place(x=110,y=300)
        boton64j = Button(naves, text="       ", command=poner_barcos_boton64j, bg = "blue")
        boton64j.place(x=140,y=300)
        boton65j = Button(naves, text="       ", command=poner_barcos_boton65j, bg = "blue")
        boton65j.place(x=170,y=300)
        boton66j = Button(naves, text="       ", command=poner_barcos_boton66j, bg = "blue")
        boton66j.place(x=200,y=300)
        boton67j = Button(naves, text="       ", command=poner_barcos_boton67j, bg = "blue")
        boton67j.place(x=230,y=300)
        boton68j = Button(naves, text="       ", command=poner_barcos_boton68j, bg = "blue")
        boton68j.place(x=260,y=300)
        boton69j = Button(naves, text="       ", command=poner_barcos_boton69j, bg = "blue")
        boton69j.place(x=290,y=300)
        boton70j = Button(naves, text="       ", command=poner_barcos_boton70j, bg = "blue")
        boton70j.place(x=320,y=300)
        boton71j = Button(naves, text="       ", command=poner_barcos_boton71j, bg = "blue")
        boton71j.place(x=50,y=325)
        boton72j = Button(naves, text="       ", command=poner_barcos_boton72j, bg = "blue")
        boton72j.place(x=80,y=325)
        boton73j = Button(naves, text="       ", command=poner_barcos_boton73j, bg = "blue")
        boton73j.place(x=110,y=325)
        boton74j = Button(naves, text="       ", command=poner_barcos_boton74j, bg = "blue")
        boton74j.place(x=140,y=325)
        boton75j = Button(naves, text="       ", command=poner_barcos_boton75j, bg = "blue")
        boton75j.place(x=170,y=325)
        boton76j = Button(naves, text="       ", command=poner_barcos_boton76j, bg = "blue")
        boton76j.place(x=200,y=325)
        boton77j = Button(naves, text="       ", command=poner_barcos_boton77j, bg = "blue")
        boton77j.place(x=230,y=325)
        boton78j = Button(naves, text="       ", command=poner_barcos_boton78j, bg = "blue")
        boton78j.place(x=260,y=325)
        boton79j = Button(naves, text="       ", command=poner_barcos_boton79j, bg = "blue")
        boton79j.place(x=290,y=325)
        boton80j = Button(naves, text="       ", command=poner_barcos_boton80j, bg = "blue")
        boton80j.place(x=320,y=325)
        boton81j = Button(naves, text="       ", command=poner_barcos_boton81j, bg = "blue")
        boton81j.place(x=50,y=350)
        boton82j = Button(naves, text="       ", command=poner_barcos_boton82j, bg = "blue")
        boton82j.place(x=80,y=350)
        boton83j = Button(naves, text="       ", command=poner_barcos_boton83j, bg = "blue")
        boton83j.place(x=110,y=350)
        boton84j = Button(naves, text="       ", command=poner_barcos_boton84j, bg = "blue")
        boton84j.place(x=140,y=350)
        boton85j = Button(naves, text="       ", command=poner_barcos_boton85j, bg = "blue")
        boton85j.place(x=170,y=350)
        boton86j = Button(naves, text="       ", command=poner_barcos_boton86j, bg = "blue")
        boton86j.place(x=200,y=350)
        boton87j = Button(naves, text="       ", command=poner_barcos_boton87j, bg = "blue")
        boton87j.place(x=230,y=350)
        boton88j = Button(naves, text="       ", command=poner_barcos_boton88j, bg = "blue")
        boton88j.place(x=260,y=350)
        boton89j = Button(naves, text="       ", command=poner_barcos_boton89j, bg = "blue")
        boton89j.place(x=290,y=350)
        boton90j = Button(naves, text="       ", command=poner_barcos_boton90j, bg = "blue")
        boton90j.place(x=320,y=350)
        boton91j = Button(naves, text="       ", command=poner_barcos_boton91j, bg = "blue")
        boton91j.place(x=50,y=375)
        boton92j = Button(naves, text="       ", command=poner_barcos_boton92j, bg = "blue")
        boton92j.place(x=80,y=375)
        boton93j = Button(naves, text="       ", command=poner_barcos_boton93j, bg = "blue")
        boton93j.place(x=110,y=375)
        boton94j = Button(naves, text="       ", command=poner_barcos_boton94j, bg = "blue")
        boton94j.place(x=140,y=375)
        boton95j = Button(naves, text="       ", command=poner_barcos_boton95j, bg = "blue")
        boton95j.place(x=170,y=375)
        boton96j = Button(naves, text="       ", command=poner_barcos_boton96j, bg = "blue")
        boton96j.place(x=200,y=375)
        boton97j = Button(naves, text="       ", command=poner_barcos_boton97j, bg = "blue")
        boton97j.place(x=230,y=375)
        boton98j = Button(naves, text="       ", command=poner_barcos_boton98j, bg = "blue")
        boton98j.place(x=260,y=375)
        boton99j = Button(naves, text="       ", command=poner_barcos_boton99j, bg = "blue")
        boton99j.place(x=290,y=375)
        boton100j = Button(naves, text="       ", command=poner_barcos_boton100j, bg = "blue")
        boton100j.place(x=320,y=375)

        #Matriz Computadora
        boton1c = Button(naves, text="       ", command=poner_barcos_boton1c, bg = "blue")
        boton1c.place(x=540,y=150)
        boton2c = Button(naves, text="       ", command=poner_barcos_boton2c, bg = "blue")
        boton2c.place(x=570,y=150)
        boton3c = Button(naves, text="       ", command=poner_barcos_boton3c, bg = "blue")
        boton3c.place(x=600,y=150)
        boton4c = Button(naves, text="       ", command=poner_barcos_boton4c, bg = "blue")
        boton4c.place(x=630,y=150)
        boton5c = Button(naves, text="       ", command=poner_barcos_boton5c, bg = "blue")
        boton5c.place(x=660,y=150)
        boton6c = Button(naves, text="       ", command=poner_barcos_boton6c, bg = "blue")
        boton6c.place(x=690,y=150)
        boton7c = Button(naves, text="       ", command=poner_barcos_boton7c, bg = "blue")
        boton7c.place(x=720,y=150)
        boton8c = Button(naves, text="       ", command=poner_barcos_boton8c, bg = "blue")
        boton8c.place(x=750,y=150)
        boton9c = Button(naves, text="       ", command=poner_barcos_boton9c, bg = "blue")
        boton9c.place(x=780,y=150)
        boton10c = Button(naves, text="       ", command=poner_barcos_boton10c, bg = "blue")
        boton10c.place(x=810,y=150)
        boton11c = Button(naves, text="       ", command=poner_barcos_boton11c, bg = "blue")
        boton11c.place(x=540,y=175)
        boton12c = Button(naves, text="       ", command=poner_barcos_boton12c, bg = "blue")
        boton12c.place(x=570,y=175)
        boton13c = Button(naves, text="       ", command=poner_barcos_boton13c, bg = "blue")
        boton13c.place(x=600,y=175)
        boton14c = Button(naves, text="       ", command=poner_barcos_boton14c, bg = "blue")
        boton14c.place(x=630,y=175)
        boton15c = Button(naves, text="       ", command=poner_barcos_boton15c, bg = "blue")
        boton15c.place(x=660,y=175)
        boton16c = Button(naves, text="       ", command=poner_barcos_boton16c, bg = "blue")
        boton16c.place(x=690,y=175)
        boton17c = Button(naves, text="       ", command=poner_barcos_boton17c, bg = "blue")
        boton17c.place(x=720,y=175)
        boton18c = Button(naves, text="       ", command=poner_barcos_boton18c, bg = "blue")
        boton18c.place(x=750,y=175)
        boton19c = Button(naves, text="       ", command=poner_barcos_boton19c, bg = "blue")
        boton19c.place(x=780,y=175)
        boton20c = Button(naves, text="       ", command=poner_barcos_boton20c, bg = "blue")
        boton20c.place(x=810,y=175)
        boton21c = Button(naves, text="       ", command=poner_barcos_boton21c, bg = "blue")
        boton21c.place(x=540,y=200)
        boton22c = Button(naves, text="       ", command=poner_barcos_boton22c, bg = "blue")
        boton22c.place(x=570,y=200)
        boton23c = Button(naves, text="       ", command=poner_barcos_boton23c, bg = "blue")
        boton23c.place(x=600,y=200)
        boton24c = Button(naves, text="       ", command=poner_barcos_boton24c, bg = "blue")
        boton24c.place(x=630,y=200)
        boton25c = Button(naves, text="       ", command=poner_barcos_boton25c, bg = "blue")
        boton25c.place(x=660,y=200)
        boton26c = Button(naves, text="       ", command=poner_barcos_boton26c, bg = "blue")
        boton26c.place(x=690,y=200)
        boton27c = Button(naves, text="       ", command=poner_barcos_boton27c, bg = "blue")
        boton27c.place(x=720,y=200)
        boton28c = Button(naves, text="       ", command=poner_barcos_boton28c, bg = "blue")
        boton28c.place(x=750,y=200)
        boton29c = Button(naves, text="       ", command=poner_barcos_boton29c, bg = "blue")
        boton29c.place(x=780,y=200)
        boton30c = Button(naves, text="       ", command=poner_barcos_boton30c, bg = "blue")
        boton30c.place(x=810,y=200)
        boton31c = Button(naves, text="       ", command=poner_barcos_boton31c, bg = "blue")
        boton31c.place(x=540,y=225)
        boton32c = Button(naves, text="       ", command=poner_barcos_boton32c, bg = "blue")
        boton32c.place(x=570,y=225)
        boton33c = Button(naves, text="       ", command=poner_barcos_boton33c, bg = "blue")
        boton33c.place(x=600,y=225)
        boton34c = Button(naves, text="       ", command=poner_barcos_boton34c, bg = "blue")
        boton34c.place(x=630,y=225)
        boton35c = Button(naves, text="       ", command=poner_barcos_boton35c, bg = "blue")
        boton35c.place(x=660,y=225)
        boton36c = Button(naves, text="       ", command=poner_barcos_boton36c, bg = "blue")
        boton36c.place(x=690,y=225)
        boton37c = Button(naves, text="       ", command=poner_barcos_boton37c, bg = "blue")
        boton37c.place(x=720,y=225)
        boton38c = Button(naves, text="       ", command=poner_barcos_boton38c, bg = "blue")
        boton38c.place(x=750,y=225)
        boton39c = Button(naves, text="       ", command=poner_barcos_boton39c, bg = "blue")
        boton39c.place(x=780,y=225)
        boton40c = Button(naves, text="       ", command=poner_barcos_boton40c, bg = "blue")
        boton40c.place(x=810,y=225)
        boton41c = Button(naves, text="       ", command=poner_barcos_boton41c, bg = "blue")
        boton41c.place(x=540,y=250)
        boton42c = Button(naves, text="       ", command=poner_barcos_boton42c, bg = "blue")
        boton42c.place(x=570,y=250)
        boton43c = Button(naves, text="       ", command=poner_barcos_boton43c, bg = "blue")
        boton43c.place(x=600,y=250)
        boton44c = Button(naves, text="       ", command=poner_barcos_boton44c, bg = "blue")
        boton44c.place(x=630,y=250)
        boton45c = Button(naves, text="       ", command=poner_barcos_boton45c, bg = "blue")
        boton45c.place(x=660,y=250)
        boton46c = Button(naves, text="       ", command=poner_barcos_boton46c, bg = "blue")
        boton46c.place(x=690,y=250)
        boton47c = Button(naves, text="       ", command=poner_barcos_boton47c, bg = "blue")
        boton47c.place(x=720,y=250)
        boton48c = Button(naves, text="       ", command=poner_barcos_boton48c, bg = "blue")
        boton48c.place(x=750,y=250)
        boton49c = Button(naves, text="       ", command=poner_barcos_boton49c, bg = "blue")
        boton49c.place(x=780,y=250)
        boton50c = Button(naves, text="       ", command=poner_barcos_boton50c, bg = "blue")
        boton50c.place(x=810,y=250)
        boton51c = Button(naves, text="       ", command=poner_barcos_boton51c, bg = "blue")
        boton51c.place(x=540,y=275)
        boton52c = Button(naves, text="       ", command=poner_barcos_boton52c, bg = "blue")
        boton52c.place(x=570,y=275)
        boton53c = Button(naves, text="       ", command=poner_barcos_boton53c, bg = "blue")
        boton53c.place(x=600,y=275)
        boton54c = Button(naves, text="       ", command=poner_barcos_boton54c, bg = "blue")
        boton54c.place(x=630,y=275)
        boton55c = Button(naves, text="       ", command=poner_barcos_boton55c, bg = "blue")
        boton55c.place(x=660,y=275)
        boton56c = Button(naves, text="       ", command=poner_barcos_boton56c, bg = "blue")
        boton56c.place(x=690,y=275)
        boton57c = Button(naves, text="       ", command=poner_barcos_boton57c, bg = "blue")
        boton57c.place(x=720,y=275)
        boton58c = Button(naves, text="       ", command=poner_barcos_boton58c, bg = "blue")
        boton58c.place(x=750,y=275)
        boton59c = Button(naves, text="       ", command=poner_barcos_boton59c, bg = "blue")
        boton59c.place(x=780,y=275)
        boton60c = Button(naves, text="       ", command=poner_barcos_boton60c, bg = "blue")
        boton60c.place(x=810,y=275)
        boton61c = Button(naves, text="       ", command=poner_barcos_boton61c, bg = "blue")
        boton61c.place(x=540,y=300)
        boton62c = Button(naves, text="       ", command=poner_barcos_boton62c, bg = "blue")
        boton62c.place(x=570,y=300)
        boton63c = Button(naves, text="       ", command=poner_barcos_boton63c, bg = "blue")
        boton63c.place(x=600,y=300)
        boton64c = Button(naves, text="       ", command=poner_barcos_boton64c, bg = "blue")
        boton64c.place(x=630,y=300)
        boton65c = Button(naves, text="       ", command=poner_barcos_boton65c, bg = "blue")
        boton65c.place(x=660,y=300)
        boton66c = Button(naves, text="       ", command=poner_barcos_boton66c, bg = "blue")
        boton66c.place(x=690,y=300)
        boton67c = Button(naves, text="       ", command=poner_barcos_boton67c, bg = "blue")
        boton67c.place(x=720,y=300)
        boton68c = Button(naves, text="       ", command=poner_barcos_boton68c, bg = "blue")
        boton68c.place(x=750,y=300)
        boton69c = Button(naves, text="       ", command=poner_barcos_boton69c, bg = "blue")
        boton69c.place(x=780,y=300)
        boton70c = Button(naves, text="       ", command=poner_barcos_boton70c, bg = "blue")
        boton70c.place(x=810,y=300)
        boton71c = Button(naves, text="       ", command=poner_barcos_boton71c, bg = "blue")
        boton71c.place(x=540,y=325)
        boton72c = Button(naves, text="       ", command=poner_barcos_boton72c, bg = "blue")
        boton72c.place(x=570,y=325)
        boton73c = Button(naves, text="       ", command=poner_barcos_boton73c, bg = "blue")
        boton73c.place(x=600,y=325)
        boton74c = Button(naves, text="       ", command=poner_barcos_boton74c, bg = "blue")
        boton74c.place(x=630,y=325)
        boton75c = Button(naves, text="       ", command=poner_barcos_boton75c, bg = "blue")
        boton75c.place(x=660,y=325)
        boton76c = Button(naves, text="       ", command=poner_barcos_boton76c, bg = "blue")
        boton76c.place(x=690,y=325)
        boton77c = Button(naves, text="       ", command=poner_barcos_boton77c, bg = "blue")
        boton77c.place(x=720,y=325)
        boton78c = Button(naves, text="       ", command=poner_barcos_boton78c, bg = "blue")
        boton78c.place(x=750,y=325)
        boton79c = Button(naves, text="       ", command=poner_barcos_boton79c, bg = "blue")
        boton79c.place(x=780,y=325)
        boton80c = Button(naves, text="       ", command=poner_barcos_boton80c, bg = "blue")
        boton80c.place(x=810,y=325)
        boton81c = Button(naves, text="       ", command=poner_barcos_boton81c, bg = "blue")
        boton81c.place(x=540,y=350)
        boton82c = Button(naves, text="       ", command=poner_barcos_boton82c, bg = "blue")
        boton82c.place(x=570,y=350)
        boton83c = Button(naves, text="       ", command=poner_barcos_boton83c, bg = "blue")
        boton83c.place(x=600,y=350)
        boton84c = Button(naves, text="       ", command=poner_barcos_boton84c, bg = "blue")
        boton84c.place(x=630,y=350)
        boton85c = Button(naves, text="       ", command=poner_barcos_boton85c, bg = "blue")
        boton85c.place(x=660,y=350)
        boton86c = Button(naves, text="       ", command=poner_barcos_boton86c, bg = "blue")
        boton86c.place(x=690,y=350)
        boton87c = Button(naves, text="       ", command=poner_barcos_boton87c, bg = "blue")
        boton87c.place(x=720,y=350)
        boton88c = Button(naves, text="       ", command=poner_barcos_boton88c, bg = "blue")
        boton88c.place(x=750,y=350)
        boton89c = Button(naves, text="       ", command=poner_barcos_boton89c, bg = "blue")
        boton89c.place(x=780,y=350)
        boton90c = Button(naves, text="       ", command=poner_barcos_boton90c, bg = "blue")
        boton90c.place(x=810,y=350)
        boton91c = Button(naves, text="       ", command=poner_barcos_boton91c, bg = "blue")
        boton91c.place(x=540,y=375)
        boton92c = Button(naves, text="       ", command=poner_barcos_boton92c, bg = "blue")
        boton92c.place(x=570,y=375)
        boton93c = Button(naves, text="       ", command=poner_barcos_boton93c, bg = "blue")
        boton93c.place(x=600,y=375)
        boton94c = Button(naves, text="       ", command=poner_barcos_boton94c, bg = "blue")
        boton94c.place(x=630,y=375)
        boton95c = Button(naves, text="       ", command=poner_barcos_boton95c, bg = "blue")
        boton95c.place(x=660,y=375)
        boton96c = Button(naves, text="       ", command=poner_barcos_boton96c, bg = "blue")
        boton96c.place(x=690,y=375)
        boton97c = Button(naves, text="       ", command=poner_barcos_boton97c, bg = "blue")
        boton97c.place(x=720,y=375)
        boton98c = Button(naves, text="       ", command=poner_barcos_boton98c, bg = "blue")
        boton98c.place(x=750,y=375)
        boton99c = Button(naves, text="       ", command=poner_barcos_boton99c, bg = "blue")
        boton99c.place(x=780,y=375)
        boton100c = Button(naves, text="       ", command=poner_barcos_boton100c, bg = "blue")
        boton100c.place(x=810,y=375)


        etiquetatexto = Label(naves, text = "Escriba su nombre", font = ("Arial","22",), bg = "blue", fg = "#ffffff", width= 15, height = 0)
        etiquetatexto.place(x = 10, y = 500)


    #entrada = Entry(widgetContenedor, width)  
        entrada1 = Entry(naves, width=50)
        entrada1.place(x=10,y=550)

        etiquetatexto = Label(naves, text = "Escriba la cantidad de naves", font = ("Arial","22",), bg = "blue", fg = "#ffffff", width= 22, height = 0)
        etiquetatexto.place(x = 500, y = 500)
    
        entrada2 = Entry(naves, width=5)
        entrada2.place(x=550,y=550)

        botonJugar= Button(naves, text="Jugar",command = comparar, bg = "#000000", fg = "#ffffff")
        botonJugar.place(x=500,y=600)



        def salir():
            naves.withdraw()
            ventana.deiconify()


        botonVolver=Button(naves, text="Volver",command=salir,bg="#000000",fg="#ffffff")
        botonVolver.place(x=300,y=600)



        naves.mainloop()        

   

def salon():
    ventana.withdraw()
    salon = Toplevel()    
    salon.title("Salón de la fama")
    salon.minsize(900,650)
    salon.resizable(width=NO,height=NO)

    imagen4 = cargarImagen("Inicio.gif")
    LabelFondo=Label(salon, image=imagen4)
    LabelFondo.place (x=-100, y=-100)


    
    try:
        salon = pickle.load( open( "salon.dat", "rb" ) )
    except:
        salon = []
    return salon
    
def guardar_salon(salon):
    
    pickle.dump( salon, open( "salon.dat", "wb" ) )

def agregar_favorito(nombre, intentos, salon):
    pos = 0
    agregado = False
    if len(salon) == 0:
        
        agregado = True
        return [{"nombre": nombre, "intentos": intentos}]
    
    for actual in salon:
        if pos > 10:
            break
        
        if intentos < actual["intentos"]:
            salon.insert(pos, {"nombre": nombre, "intentos": intentos})
            agregado = True
            break
        pos += 1

    if pos < 10 and not agregado:
        salon.append({"nombre": nombre, "intentos": intentos})
    
    return salon

    salon.mainloop()

def instrucciones():
    ##Creamos otra ventana
    instrucciones = Toplevel()    
    instrucciones.title("Instrucciones")
    instrucciones.minsize(900,300)
    instrucciones.resizable(width=NO,height=NO)
    canvas = Canvas(instrucciones , width= 900, height = 300, bg = "blue")
    canvas.place(x=0,y=0)
    etiquetatexto = Label(instrucciones, text = "Instrucciones", font = ("Arial","20","underline"), bg= "blue", fg = "#000000", width= 30, height = 2)
    etiquetatexto.place(x = 45, y = 1)
    etiquetatexto = Label(instrucciones, text = "El jugador ubica los barcos en el primer tablero.", font = ("Arial","12"), bg = "blue", fg = "#000000", width= 37, height = 1)
    etiquetatexto.place(x = 20, y = 110)
    etiquetatexto = Label(instrucciones, text = "Cada jugador en su turno dispara en el tablero de su oponente, disparando en una posición en el segundo tablero.", font = ("Arial","12"), bg = "blue", fg = "#000000", width= 89, height = 1)
    etiquetatexto.place(x = 20, y = 150)
    etiquetatexto = Label(instrucciones, text = "El juego acaba hasta que alguno de los jugadores hunda todas las naves de su oponente.", font = ("Arial","12"), bg = "blue", fg = "#000000", width= 68, height = 1)
    etiquetatexto.place(x = 20, y = 190)
    etiquetatexto = Label(instrucciones, text = "El jugador debera de escribir su nombre y la cantidad de naves con la que desea jugar.", font = ("Arial","12"), bg = "blue", fg = "#000000", width= 67, height = 1)
    etiquetatexto.place(x = 20, y = 70)

    def salir():
        instrucciones.withdraw()
        ventana.deiconify()

    botonVolver = Button(instrucciones, text="Volver",command=salir, bg = "#000000", fg = "#ffffff" )
    botonVolver.place(x=800,y=200)

    instrucciones.mainloop()



    def salir():
        ventana.deiconify()

    botonVolver = Button(puntaje_mayor, text="Volver",command=salir, font = ("Comic Sans MS","10"), bg = "#000000", fg = "#ffffff" )
    botonVolver.place(x=320,y=340)

#botones de la primera ventana
botonContinuar=Button(ventana, text="Continuar",bg="#000000",fg="#ffffff")
botonContinuar.place(x=100,y=200)

botonJugar = Button(ventana, text="Juego Nuevo",command=naves, bg = "#000000", fg = "#ffffff")
botonJugar.place(x=100,y=250)

botonSalon = Button(ventana,command=salon, text="Salón de La Fama", bg = "#000000", fg = "#ffffff")
botonSalon.place(x=100,y=300)

botonInstrucc = Button(ventana,command=instrucciones, text= "Instrucciones", bg="#000000", fg="#ffffff")
botonInstrucc.place(x=100,y=350)

botonSalir = Button(ventana, text="Salir",command=quit, bg = "#000000", fg = "#ffffff")
botonSalir.place(x=100,y=400)

ventana.mainloop()

